/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package suministros.ejb30.entity;

import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Diana
 */
@Entity
@Table(name = "CasillaSuministro")
@NamedQueries({
    @NamedQuery(name = "CasillaSuministro.findAll", query = "SELECT c FROM CasillaSuministro c"),
    @NamedQuery(name = "CasillaSuministro.findByIdZona", query = "SELECT c FROM CasillaSuministro c WHERE c.idZona = :idZona"),
    @NamedQuery(name = "CasillaSuministro.findByIdAlmacen", query = "SELECT c FROM CasillaSuministro c WHERE c.idAlmacen = :idAlmacen"),
    @NamedQuery(name = "CasillaSuministro.findByIdSubalmacen", query = "SELECT c FROM CasillaSuministro c WHERE c.idSubalmacen = :idSubalmacen"),
    @NamedQuery(name = "CasillaSuministro.findByIdAmbiente", query = "SELECT c FROM CasillaSuministro c WHERE c.idAmbiente = :idAmbiente"),
    @NamedQuery(name = "CasillaSuministro.findByIdPabellon", query = "SELECT c FROM CasillaSuministro c WHERE c.idPabellon = :idPabellon"),
    @NamedQuery(name = "CasillaSuministro.findByIdEstante", query = "SELECT c FROM CasillaSuministro c WHERE c.idEstante = :idEstante"),
    @NamedQuery(name = "CasillaSuministro.findByIdCasilla", query = "SELECT c FROM CasillaSuministro c WHERE c.casillaSuministroPK.idCasilla = :idCasilla"),
    @NamedQuery(name = "CasillaSuministro.findByIdSuministro", query = "SELECT c FROM CasillaSuministro c WHERE c.casillaSuministroPK.idSuministro = :idSuministro"),
    @NamedQuery(name = "CasillaSuministro.findByIdEmpresa", query = "SELECT c FROM CasillaSuministro c WHERE c.idEmpresa = :idEmpresa"),
    @NamedQuery(name = "CasillaSuministro.findByUsuario", query = "SELECT c FROM CasillaSuministro c WHERE c.usuario = :usuario"),
    @NamedQuery(name = "CasillaSuministro.findByMac", query = "SELECT c FROM CasillaSuministro c WHERE c.mac = :mac")})
public class CasillaSuministro implements Serializable {
    private static final long serialVersionUID = 1L;
    @EmbeddedId
    protected CasillaSuministroPK casillaSuministroPK;
    @Column(name = "id_zona")
    private String idZona;
    @Column(name = "id_almacen")
    private String idAlmacen;
    @Column(name = "id_subalmacen")
    private Integer idSubalmacen;
    @Column(name = "id_ambiente")
    private Integer idAmbiente;
    @Column(name = "id_pabellon")
    private Integer idPabellon;
    @Column(name = "id_estante")
    private Integer idEstante;
    @Column(name = "id_empresa")
    private String idEmpresa;
    @Column(name = "usuario")
    private String usuario;
    @Column(name = "mac")
    private String mac;

    public CasillaSuministro() {
    }

    public CasillaSuministro(CasillaSuministroPK casillaSuministroPK) {
        this.casillaSuministroPK = casillaSuministroPK;
    }

    public CasillaSuministro(int idCasilla, String idSuministro) {
        this.casillaSuministroPK = new CasillaSuministroPK(idCasilla, idSuministro);
    }

    public CasillaSuministroPK getCasillaSuministroPK() {
        return casillaSuministroPK;
    }

    public void setCasillaSuministroPK(CasillaSuministroPK casillaSuministroPK) {
        this.casillaSuministroPK = casillaSuministroPK;
    }

    public String getIdZona() {
        return idZona;
    }

    public void setIdZona(String idZona) {
        this.idZona = idZona;
    }

    public String getIdAlmacen() {
        return idAlmacen;
    }

    public void setIdAlmacen(String idAlmacen) {
        this.idAlmacen = idAlmacen;
    }

    public Integer getIdSubalmacen() {
        return idSubalmacen;
    }

    public void setIdSubalmacen(Integer idSubalmacen) {
        this.idSubalmacen = idSubalmacen;
    }

    public Integer getIdAmbiente() {
        return idAmbiente;
    }

    public void setIdAmbiente(Integer idAmbiente) {
        this.idAmbiente = idAmbiente;
    }

    public Integer getIdPabellon() {
        return idPabellon;
    }

    public void setIdPabellon(Integer idPabellon) {
        this.idPabellon = idPabellon;
    }

    public Integer getIdEstante() {
        return idEstante;
    }

    public void setIdEstante(Integer idEstante) {
        this.idEstante = idEstante;
    }

    public String getIdEmpresa() {
        return idEmpresa;
    }

    public void setIdEmpresa(String idEmpresa) {
        this.idEmpresa = idEmpresa;
    }

    public String getUsuario() {
        return usuario;
    }

    public void setUsuario(String usuario) {
        this.usuario = usuario;
    }

    public String getMac() {
        return mac;
    }

    public void setMac(String mac) {
        this.mac = mac;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (casillaSuministroPK != null ? casillaSuministroPK.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CasillaSuministro)) {
            return false;
        }
        CasillaSuministro other = (CasillaSuministro) object;
        if ((this.casillaSuministroPK == null && other.casillaSuministroPK != null) || (this.casillaSuministroPK != null && !this.casillaSuministroPK.equals(other.casillaSuministroPK))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "suministros.ejb30.entity.CasillaSuministro[casillaSuministroPK=" + casillaSuministroPK + "]";
    }

}
